package com.wzh.live.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wzh.common.utils.PageUtils;
import com.wzh.common.utils.Query;

import com.wzh.live.dao.OrderLiveDao;
import com.wzh.live.entity.OrderLiveEntity;
import com.wzh.live.service.OrderLiveService;


@Service("orderLiveService")
public class OrderLiveServiceImpl extends ServiceImpl<OrderLiveDao, OrderLiveEntity> implements OrderLiveService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String userId = (String) params.get("userId");
        IPage<OrderLiveEntity> page = this.page(
                new Query<OrderLiveEntity>().getPage(params),
                new QueryWrapper<OrderLiveEntity>().eq("user_id",userId)
        );
        return new PageUtils(page);
    }

}